extends "../cTDP_4/cTDP_4.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "德鲁伊"
	lv = 3
	attCoe.atk = 32 / 8.5 * 2 / 3
	attCoe.maxHp = 750 / 112.5 / 3
	addCdSkill("dly1",10)
	addSkillTxt("树木生长：树的血量增加200/400点[史诗200，传奇400]")
	addSkillTxt("风暴术：召唤风暴攻击敌方全体，每秒造成45点魔法伤害，持续7秒[cd:10秒]")
func _onBattleStart():
	._onBattleStart()
	yield(reTimer(0.02),"timeout")
	var chas = getAllChas(2)
	for i in chas:
		if i.id.find("tree") != -1:
			if i.get("hasplus") == true:continue
			i.hasplus = true
			i.attInfo.maxHp += 200 + 200*(lv-3)
			i.upAtt()
			i.healCha(i,200)


func _castCdSkill(id):
	._castCdSkill(id)
	var chas = getAllChas(2)
	if id == "dly1":
		var chas1 = getAllChas(1)
		if !chas1.size():return
		cst("风暴术","000000",position)	
		for i in chas1:
			i.addBuff(BF1.new(1,self))

class BF1:
	extends Buff
	var cha
	func _init(lv,cha):
		attInit()
		life = lv * 7
		self.cha = cha

	func _upS():
		if !cha:
			masCha.hurtChara(masCha,45,Chara.HurtType.MGI,Chara.AtkType.SKILL)
		else:
			cha.hurtChara(masCha,45,Chara.HurtType.MGI,Chara.AtkType.SKILL)